Technical Q&A

TB50 - Menu Definition Drawing Dimmed Items (17-December-98)


Q: What's the correct method for a custom menu definition function ('MDEF') to dim menu items? What's the preferred method for determining whether to draw in a gray color, or paint the items with a gray pattern?

A: When Appearance Manager 1.0.1 or later is present, you should use the theme brush constants (such as kThemeTextColorMenuItemDisabled).

When Appearance Manager 1.0.1 or later is NOT present, the proper method for dimming text in menu items is to use the grayishTextOr transfer mode. This mode takes into account both color and black-and-white screens. A simple method for dimming non-text items is to set the OpColor to gray, and then draw the nontext item in Blend mode.

Further Reference:

Inside Macintosh: Menu Manager
Inside Macintosh: Appearance Manager
Inside Macintosh: QuickDraw Text
Inside Macintosh: QuickDraw
Q&A QD59: grayishTextOr and Mac OS 8.5



-- Pete Gontier
Worldwide Developer Technical Support

Technical Q&As | Contents
Previous Question | Next Question

To contact us, please use the Contact Us page.